< previous page page_442 next page >

Page 442
As soon as you confirm that the modifications to the DataGraph object work without errors, recompile the ActiveX DLL. You can use this OLE Server DLL in all your future VBA projects. As an example, you can now add some graphs to the CompanyMaster project you started last week.
Adding Graphs to the CompanyMaster Project
For the last project of the day, you add three graphs to the CompanyMaster project:
· A pie graph showing the actual year-to-date sales totals by region
· A line graph showing the year-to-date sales totals by month
· A bar graph showing the sales by customer
First you have to add a new menu item to the CompanyMaster form that calls the graphs. Then you need to construct SQL statements that select the desired data and feed it to the graph object.
Adding the Graph Menu Option
Adding the graph menu items is pretty easy. First, load the MASTER.VBP project from the CHAP11\COMASTER directory. Add the graph object to the project by selecting Project | References and locating and adding the Databound Graph object library (see Figure 11.13).
0442-01.jpg
Figure 11.13.
Adding the Databound Graph object library.

 
< previous page page_442 next page >

If you like this book, buy it!